package com.example.helloword.pojo;



import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.security.PrivateKey;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Component //组件
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ConfigurationProperties(prefix = "person")  //指定 yml中的内容 “” 里面小写

//@PropertySource(value = "classpath:application.properties")   指定配置文件 指定值

//@Validated //数据效验
public class Person {

 //   @Value("${Person.name}")

   // @Email(message="邮箱格式错误")
    private String name;
    private Integer age;
    private Boolean happy;
    private Date birth;
    private Map<String,Object> maps;
    private List<Object> list;
    private Dog dog;
}
